><

Choosing a file format for optimization



The file format you choose for an optimized image is determined by the color, tonal, and graphic characteristics of the original image. In general, continuous-tone images, such as photographs, should be compressed as JPEG files. Illustrations with flat color or sharp edges and crisp detail, such as type, should be compressed as GIF or PNG-8 files.

PNG-24 file format is suitable for continuous-tone images. However, PNG-24 files are often much larger than JPEG files of the same image. PNG-24 format is recommended only when working with a continuous-tone image that includes multilevel transparency. (Multilevel transparency is supported by the PNG-24 format but the JPEG format does not support any transparency. See Making transparent and matted images.)

A photograph suitable for compression as a JPEG or PNG-24 image, and artwork suitable for compression as a GIF or PNG-8 image

Choose a format that contains sufficient pixel depth to display the color information in the image. PNG-8 and GIF files support 8-bit color, which means that they can display up to 256 color values. JPEG and PNG-24 files support 24-bit color, which means that they can display roughly 16 million color values. Depending on the format, you can specify image quality, background transparency or matting, color display, and downloading method.

The appearance of an image on the Web also depends on the computer platform, color display system, operating system, and browser used to display the image. Preview images in different browsers on different platforms to see how the images will appear on the Web.


Optimizing Images for the Web > Choosing a file format for optimization

Related subtopics: